package com.gjy.spring.s9;

import com.gjy.spring.s9.service.MyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * ajc 编译器
 * 必须使用mvn compile才可以
 *
 * @author 宫静雨
 * @version 1.0
 * @since 2023-12-20 14:36:40
 */
@SpringBootApplication
public class S9App {
    private static final Logger log = LoggerFactory.getLogger(S9App.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(S9App.class, args);
        MyService service = context.getBean(MyService.class);

        log.info("service.getClass: {}", service.getClass());
        service.foo();

        context.close();
    }
}
